home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1454.dms / var1454.adf / EasySound / EasySound.h < prev    next >
C/C++ Source or Header  |  1992-05-10  |  3KB  |  79 lines

  1. /***********************************************************/
  2. /*                                                         */
  3. /* Amiga C Manual (ACM) V3.0            Amiga C Club (ACC) */
  4. /* -------------------------            ------------------ */
  5. /*                                                         */
  6. /* Chapter: Easy Sound                  Amiga C Club       */
  7. /* File:    EasySound.h                 Tulevagen 22       */
  8. /* Author:  Anders Bjerin               181 41  LIDINGO    */
  9. /* Date:    92-02-29                    SWEDEN             */
  10. /* Version: 2.15                                           */
  11. /*                                                         */
  12. /*   Copyright 1992, Anders Bjerin - Amiga C Club (ACC)    */
  13. /*                                                         */
  14. /* Registered members may use this program freely in their */
  15. /*     own commercial/noncommercial programs/articles.     */
  16. /*                                                         */
  17. /***********************************************************/
  18.  
  19. #ifndef EXEC_TYPES_H
  20.   #include <exec/types.h>
  21. #endif !EXEC_TYPES_H
  22.  
  23. /* Sound channels: */
  24. #define LEFT0         0
  25. #define RIGHT0        1
  26. #define RIGHT1        2
  27. #define LEFT1         3
  28.  
  29. #define NONSTOP       0 /* Play the sound over and over... */
  30. #define ONCE          1 /* Play the sound once. */ 
  31. #define MAXVOLUME    64 /* Maximum volume. */
  32. #define MINVOLUME     0 /* Minimum volume. */
  33. #define NORMALRATE    0 /* Normal rate. */
  34. #define DO_NOT_WAIT   0 /* Do not wait for the sound to be completed. */ 
  35. #define WAIT          1 /* Wait for the sound to be completed. */
  36.  
  37. /* Sound priorities: */
  38. #define SOUND_PRI_UNSTOPPABLE  (BYTE)127
  39. #define SOUND_PRI_EMERGENCIES  (BYTE)95
  40. #define SOUND_PRI_ATTENTION    (BYTE)85
  41. #define SOUND_PRI_SPEECH       (BYTE)75
  42. #define SOUND_PRI_INFORMATION  (BYTE)60
  43. #define SOUND_PRI_MUSIC        (BYTE)0
  44. #define SOUND_PRI_EFFECT       (BYTE)-35
  45. #define SOUND_PRI_BACKGROUND   (BYTE)-90
  46. #define SOUND_PRI_SILENCE      (BYTE)-128
  47.  
  48.  
  49. extern BOOL ESPlaySound
  50. (
  51.   struct SoundInfo *info,
  52.   UWORD volume,
  53.   UBYTE channel,
  54.   BYTE priority,
  55.   WORD delta_rate,
  56.   UWORD repeat,
  57.   ULONG start,
  58.   ULONG time,
  59.   BOOL wait 
  60. );
  61.  
  62. extern void ESStopSound( UBYTE channel );
  63.  
  64. extern void ESRemoveSound( struct SoundInfo *info );
  65.  
  66. extern struct SoundInfo *ESPrepareSound( STRPTR file );
  67.  
  68.  
  69.  
  70. /* SoundInfo structure: */
  71. struct SoundInfo
  72. {
  73.   BYTE *SoundBuffer; /* WaveForm Buffers.           */
  74.   UWORD RecordRate;  /* Record Rate.                */
  75.   ULONG FileLength;  /* WaveForm Lengths.           */
  76.   UBYTE channel_bit; /* Audio channel bit position. */
  77. };
  78.  
  79.